\(\int \cot (c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^3 \, dx\) [212]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 65 \[ \int \cot (c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {3 a^3 \csc (c+d x)}{d}-\frac {3 a^3 \csc ^2(c+d x)}{2 d}-\frac {a^3 \csc ^3(c+d x)}{3 d}+\frac {a^3 \log (\sin (c+d x))}{d} \]

[Out]

-3*a^3*csc(d*x+c)/d-3/2*a^3*csc(d*x+c)^2/d-1/3*a^3*csc(d*x+c)^3/d+a^3*ln(sin(d*x+c))/d

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2912, 12, 45} \[ \int \cot (c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {a^3 \csc ^3(c+d x)}{3 d}-\frac {3 a^3 \csc ^2(c+d x)}{2 d}-\frac {3 a^3 \csc (c+d x)}{d}+\frac {a^3 \log (\sin (c+d x))}{d} \]

[In]

Int[Cot[c + d*x]*Csc[c + d*x]^3*(a + a*Sin[c + d*x])^3,x]

[Out]

(-3*a^3*Csc[c + d*x])/d - (3*a^3*Csc[c + d*x]^2)/(2*d) - (a^3*Csc[c + d*x]^3)/(3*d) + (a^3*Log[Sin[c + d*x]])/
d

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2912

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {a^4 (a+x)^3}{x^4} \, dx,x,a \sin (c+d x)\right )}{a d} \\ & = \frac {a^3 \text {Subst}\left (\int \frac {(a+x)^3}{x^4} \, dx,x,a \sin (c+d x)\right )}{d} \\ & = \frac {a^3 \text {Subst}\left (\int \left (\frac {a^3}{x^4}+\frac {3 a^2}{x^3}+\frac {3 a}{x^2}+\frac {1}{x}\right ) \, dx,x,a \sin (c+d x)\right )}{d} \\ & = -\frac {3 a^3 \csc (c+d x)}{d}-\frac {3 a^3 \csc ^2(c+d x)}{2 d}-\frac {a^3 \csc ^3(c+d x)}{3 d}+\frac {a^3 \log (\sin (c+d x))}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.88 \[ \int \cot (c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=a^3 \left (-\frac {3 \csc (c+d x)}{d}-\frac {3 \csc ^2(c+d x)}{2 d}-\frac {\csc ^3(c+d x)}{3 d}+\frac {\log (\sin (c+d x))}{d}\right ) \]

[In]

Integrate[Cot[c + d*x]*Csc[c + d*x]^3*(a + a*Sin[c + d*x])^3,x]

[Out]

a^3*((-3*Csc[c + d*x])/d - (3*Csc[c + d*x]^2)/(2*d) - Csc[c + d*x]^3/(3*d) + Log[Sin[c + d*x]]/d)

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.69

method result size
derivativedivides \(-\frac {a^{3} \left (\frac {\left (\csc ^{3}\left (d x +c \right )\right )}{3}+\frac {3 \left (\csc ^{2}\left (d x +c \right )\right )}{2}+3 \csc \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )\right )\right )}{d}\) \(45\)
default \(-\frac {a^{3} \left (\frac {\left (\csc ^{3}\left (d x +c \right )\right )}{3}+\frac {3 \left (\csc ^{2}\left (d x +c \right )\right )}{2}+3 \csc \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )\right )\right )}{d}\) \(45\)
parallelrisch \(-\frac {a^{3} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )+\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )+9 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+9 \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-24 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+24 \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+39 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+39 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}\) \(106\)
risch \(-i a^{3} x -\frac {2 i a^{3} c}{d}-\frac {2 i a^{3} \left (9 \,{\mathrm e}^{5 i \left (d x +c \right )}-22 \,{\mathrm e}^{3 i \left (d x +c \right )}+9 i {\mathrm e}^{4 i \left (d x +c \right )}+9 \,{\mathrm e}^{i \left (d x +c \right )}-9 i {\mathrm e}^{2 i \left (d x +c \right )}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}+\frac {a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) \(118\)
norman \(\frac {-\frac {a^{3}}{24 d}-\frac {3 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}-\frac {7 a^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {53 a^{3} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {59 a^{3} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}-\frac {53 a^{3} \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {7 a^{3} \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {3 a^{3} \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {a^{3} \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {15 a^{3} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {15 a^{3} \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {a^{3} \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) \(265\)

[In]

int(cos(d*x+c)*csc(d*x+c)^4*(a+a*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

-1/d*a^3*(1/3*csc(d*x+c)^3+3/2*csc(d*x+c)^2+3*csc(d*x+c)+ln(csc(d*x+c)))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.40 \[ \int \cot (c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {18 \, a^{3} \cos \left (d x + c\right )^{2} - 9 \, a^{3} \sin \left (d x + c\right ) - 20 \, a^{3} - 6 \, {\left (a^{3} \cos \left (d x + c\right )^{2} - a^{3}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right )}{6 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)^4*(a+a*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

-1/6*(18*a^3*cos(d*x + c)^2 - 9*a^3*sin(d*x + c) - 20*a^3 - 6*(a^3*cos(d*x + c)^2 - a^3)*log(1/2*sin(d*x + c))
*sin(d*x + c))/((d*cos(d*x + c)^2 - d)*sin(d*x + c))

Sympy [F(-1)]

Timed out. \[ \int \cot (c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)**4*(a+a*sin(d*x+c))**3,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.89 \[ \int \cot (c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {6 \, a^{3} \log \left (\sin \left (d x + c\right )\right ) - \frac {18 \, a^{3} \sin \left (d x + c\right )^{2} + 9 \, a^{3} \sin \left (d x + c\right ) + 2 \, a^{3}}{\sin \left (d x + c\right )^{3}}}{6 \, d} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)^4*(a+a*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

1/6*(6*a^3*log(sin(d*x + c)) - (18*a^3*sin(d*x + c)^2 + 9*a^3*sin(d*x + c) + 2*a^3)/sin(d*x + c)^3)/d

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.91 \[ \int \cot (c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {6 \, a^{3} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - \frac {18 \, a^{3} \sin \left (d x + c\right )^{2} + 9 \, a^{3} \sin \left (d x + c\right ) + 2 \, a^{3}}{\sin \left (d x + c\right )^{3}}}{6 \, d} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)^4*(a+a*sin(d*x+c))^3,x, algorithm="giac")

[Out]

1/6*(6*a^3*log(abs(sin(d*x + c))) - (18*a^3*sin(d*x + c)^2 + 9*a^3*sin(d*x + c) + 2*a^3)/sin(d*x + c)^3)/d

Mupad [B] (verification not implemented)

Time = 9.38 (sec) , antiderivative size = 147, normalized size of antiderivative = 2.26 \[ \int \cot (c+d x) \csc ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (13\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+3\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a^3}{3}\right )}{8\,d}-\frac {13\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}-\frac {a^3\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d} \]

[In]

int((cos(c + d*x)*(a + a*sin(c + d*x))^3)/sin(c + d*x)^4,x)

[Out]

(a^3*log(tan(c/2 + (d*x)/2)))/d - (3*a^3*tan(c/2 + (d*x)/2)^2)/(8*d) - (a^3*tan(c/2 + (d*x)/2)^3)/(24*d) - (co
t(c/2 + (d*x)/2)^3*(13*a^3*tan(c/2 + (d*x)/2)^2 + a^3/3 + 3*a^3*tan(c/2 + (d*x)/2)))/(8*d) - (13*a^3*tan(c/2 +
 (d*x)/2))/(8*d) - (a^3*log(tan(c/2 + (d*x)/2)^2 + 1))/d